package com.iweb.client;

import com.iweb.client.fallback.UserClientFallback;
import com.iweb.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 作者: jack
 * 时间: 2020-07-07 19:15
 * 描述: UserClient
 */
@FeignClient(value = "provider", fallback = UserClientFallback.class)
public interface UserClient {

    @GetMapping("/user/{id}") // 这里的url要写完整的
    public User findById(@PathVariable Long id);

}
